﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Scope 作用范围</title>
    <script type="text/javascript" src="Scripts/angular.js"></script>
</head>
<body>
    <div ng-app="myApp" ng-controller="myCtrl">
        <ul>
            <li ng-repeat="x in names">{{x}}</li>
        </ul>

    </div>

    <script type="text/javascript">
        var app = angular.module("myApp", []);
        app.controller("myCtrl", function ($scope) {
            $scope.names = ["Emil", "Tobias", "Linus"];
        });
    </script>
</body>
</html>